
function ajaxControl(url, dataType, async, type, data, callBack) {

    $.ajax({
        url: url,
        dataType: dataType,
        async: async,
        type: type,
        data: data,
        success: callBack
    });
}

/*异步json格式的ajax*/
function jsonAsyncAjax(url, post, data, callBack) {
    ajaxControl(url, "json", false, post, data, callBack);
}

/*同步json格式的ajax*/
function jsonAjax(url, post, data, callBack) {
    ajaxControl(url, "json", true, post, data, callBack);
}

function stringSyncAjax(url, post, data, callBack) {
    ajaxControl(url, "text", false, post, data, callBack);
}

function stringAjax(url, post, data, callBack) {
    ajaxControl(url, "text", true, post, data, callBack);
}